# -*- coding: utf-8 -*-
from django.urls import path
from rest_framework import routers

from app.device.views.device_ctrl_log import DeviceCtrlLogViewSet
from app.device.views.devicestatelog import DevicestatelogViewSet
from app.device.views.devicestates import DevicestatesViewSet
from app.device.views.devicesattr import DevicesAttrViewSet
from app.device.views.devices import DevicesViewSet
from app.device.views.devicemodel import DevicemodelViewSet
from app.device.views.devicetypeattr import DevicetypeattrViewSet
from app.device.views.ddl import DDLViewSet
from app.device.views.department import DepartmentViewSet
from app.device.views.driverinfo import DriverinfoViewSet


system_url = routers.DefaultRouter()
system_url.register(r'department', DepartmentViewSet)
system_url.register(r'ddl', DDLViewSet)
system_url.register(r'device_model', DevicemodelViewSet)
system_url.register(r'devices', DevicesViewSet)
system_url.register(r'devices_attr', DevicesAttrViewSet)
system_url.register(r'device_states', DevicestatesViewSet)
system_url.register(r'device_log', DevicestatelogViewSet)
system_url.register(r'device_type_attr', DevicetypeattrViewSet)
system_url.register(r'driver_info', DriverinfoViewSet)
system_url.register(r'device_ctrl_log', DeviceCtrlLogViewSet)

urlpatterns = [
    path('device_ctrl_log/condition/', DeviceCtrlLogViewSet.as_view({'get': 'get_ctrl_log_by_condition'})),
]

urlpatterns += system_url.urls
